package com.zhijiaoyun.service;

import com.zhijiaoyun.model.CourseCategory;

import java.util.List;
import java.util.Map;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public interface ICourseCategoryService {

    CourseCategory getCourseCategoryByName(String name);

    void addCategory(CourseCategory courseCategory);

    CourseCategory getCourseCategoryByNameNotCategoryId(String name, Long categoryId);

    void updateCategory(CourseCategory courseCategory);

    CourseCategory getCourseCategoryByCategoryId(Long categoryId);

    List<CourseCategory> getCourseCategory();

    List<CourseCategory> getCourseCategoryByParentId(Long parentId);

    List<Long> getIdsByParentId(Long categoryId);

    List<Long> getLastIdsByCategoryId(Long categoryId, List<Long> categoryIds);

    CourseCategory getCourseCategoryByNameParentId(String name, Long parentId);

    CourseCategory getCourseCategoryByNameNotCategoryId(String name, Long parentId, Long categoryId);

    void deleteCourseCategory(CourseCategory category);

    void deleteCourseCategoryByParentId(Long parentId);

    List<Long> getSpecialIdsByParentId(Long parentId, boolean isHigerEdu);

    List<Long> getSpecialIdsByParentIdType(Long parentId, int type);

    /**
     * list by parentId
     *
     * @param parentId
     * @return
     */
    Map<String, Object> listByParentId(long parentId);
}
